package com.szh.zx.duoxiancheng.chapter1;
/*测试生产者与消费之
* */
public class TestPC {

}
class Producter extends Thread{}
class Cunsumer extends Thread{}
class Chicken{
	int id;

	public Chicken(int id) {
		this.id = id;
	}
}
class Syscontainer{
//	容器 计数器
	int  count =0;
	Chicken[] chickens = new Chicken[10];
//	生产者放入产品
	public synchronized void push(Chicken chicken){
		if (count == chickens.length){
//			通知生成者等等
		}
		chickens[count] = chicken;
		count++;
	}
//	消费者消费
	public synchronized Chicken pop(){
		if (count ==0){
//			等待值生成者生成

		}
		count --;
		Chicken chicken = chickens[count];
//		通知生产者生产
		return chicken;
	}
}